package com.cskaoyan.bean.promotion;

import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 广告管理浏览器接受的数据
 * @Author: WD created on 2021-09-15 17:32
 * @Version:
 */
@NoArgsConstructor
@Data
@AllArgsConstructor
public class ShowPosterListVO {
    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<PosterListVO> list;

    public ShowPosterListVO(PageInfo<Poster> pageInfo, List<PosterListVO> list) {
        this.total = Math.toIntExact(pageInfo.getTotal());
        this.limit = pageInfo.getPageSize();
        this.page = pageInfo.getPageNum();
        this.pages = pageInfo.getPages();

        this.list = list;

    }
}
